package com.fire.ioc;

import com.fire.ioc.service.UserService;
import org.springframework.context.ApplicationContext;
import org.springframework.context.support.ClassPathXmlApplicationContext;

/**
 * @author zwd
 * @date 2021/7/28
 * @email zwd@hhh.com
 */
public class IOCMain {
	public static void main(String[] args) {
		ApplicationContext context = new ClassPathXmlApplicationContext("classpath:application.xml");
		//先获取DefaultListableBeanFactory在通过getBean方法获取容器中的实例化对象
		UserService userService = context.getBean(UserService.class);
		userService.Hello();
	}
}
